package cn.bsuc.infirmary.util;

import cn.bsuc.infirmary.domain.Student;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;

public abstract class UserContext {
    public static Student getCurrentUser() {
        Subject subject = SecurityUtils.getSubject();
        return (Student) subject.getPrincipal();
    }
}
